﻿using System;
using System.ComponentModel;
using System.Security.Policy;
using System.Text.Json.Serialization;
using WWLauncher.Util;

namespace WWLauncher.ViewModel
{
    [Serializable]
    public class DebugConfig : INotifyPropertyChanged
    {
        private bool isRecordLogs;
        private bool showInTaskbar;
        /// <summary>
        /// 是否记录日志
        /// </summary>
        public bool IsRecordLogs
        {
            get
            {
                return isRecordLogs;
            }
            set
            {
                isRecordLogs = value;
                OnPropertyChanged("IsRecordLogs");
            }
        }

        /// <summary>
        /// 显示ShowInTaskbar
        /// </summary>
        public bool ShowInTaskbar
        {
            get => showInTaskbar;
            set
            {
                showInTaskbar = value;
                OnPropertyChanged("ShowInTaskbar");
            }
        }

        [field: NonSerialized]
        public event PropertyChangedEventHandler PropertyChanged;
        private void OnPropertyChanged(string propertyName)
        {
            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
        }
    }
}